home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / demos / VisualAge for Java 2.0 Entry / setup / data1.cab / ide-e / IDE / cache / 1R1ZBZ1 (.txt) < prev    next >
Encoding:
Java Class File  |  1998-09-16  |  2.1 KB  |  54 lines

  1. package com.sun.java.swing;
  2.  
  3. import com.sun.java.accessibility.Accessible;
  4. import com.sun.java.accessibility.AccessibleContext;
  5. import com.sun.java.swing.plaf.ButtonUI;
  6.  
  7. public class JRadioButton extends JToggleButton implements Accessible {
  8.    public JRadioButton() {
  9.       this((String)null, (Icon)null, false);
  10.    }
  11.  
  12.    public JRadioButton(Icon icon) {
  13.       this((String)null, icon, false);
  14.    }
  15.  
  16.    public JRadioButton(Icon icon, boolean selected) {
  17.       this((String)null, icon, selected);
  18.    }
  19.  
  20.    public JRadioButton(String text) {
  21.       this(text, (Icon)null, false);
  22.    }
  23.  
  24.    public JRadioButton(String text, Icon icon) {
  25.       this(text, icon, false);
  26.    }
  27.  
  28.    public JRadioButton(String text, Icon icon, boolean selected) {
  29.       super(text, icon, selected);
  30.       ((AbstractButton)this).setBorderPainted(false);
  31.       ((AbstractButton)this).setHorizontalAlignment(2);
  32.    }
  33.  
  34.    public JRadioButton(String text, boolean selected) {
  35.       this(text, (Icon)null, selected);
  36.    }
  37.  
  38.    public AccessibleContext getAccessibleContext() {
  39.       if (super.accessibleContext == null) {
  40.          super.accessibleContext = new AccessibleJRadioButton(this);
  41.       }
  42.  
  43.       return super.accessibleContext;
  44.    }
  45.  
  46.    public String getUIClassID() {
  47.       return "RadioButtonUI";
  48.    }
  49.  
  50.    public void updateUI() {
  51.       ((AbstractButton)this).setUI((ButtonUI)UIManager.getUI(this));
  52.    }
  53. }
  54.